#include "PCH.h"
#include "device_dx9.h"
#include "D3DHeader.h"
using namespace Graphic;

Device*  Graphic::CreateDevice(const CreateParam& cp)
{
	DeviceDX9 *pDevice = new DeviceDX9;
	if(pDevice->Initial(cp))
	{
		return pDevice;
	}
	else
	{
		delete pDevice;
		return 0;
	}
}


int Graphic::GetARGB(int r, int g, int b, int a)
{
	return D3DCOLOR_ARGB(a,r,g,b);
}


int Graphic::GetXRGB(int r, int g, int b)
{
	return D3DCOLOR_XRGB(r,g,b);
}

